/*
 * SPDX-License-Identifier: GPL-2.0
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2023. All rights reserved.
 * Description:
 * Author: -
 * Create:
 */

#ifndef HIUDK_INTERNAL_H
#define HIUDK_INTERNAL_H

#include <linux/mutex.h>
#include "hiudk3.h"
#include "hiudk3_crm.h"
#include "hiudk3_lld.h"

#define GET_SDKOPS_FROM_HIUDKHWDEV(x) ((struct hiudk_ops *)(((struct hiudk_dev *)(x))->ops))
#define GET_DEV_HDL_FROM_HIUDKHWDEV(x) (((struct hiudk_dev *)(x))->dev_hdl)


struct hiudk_ctrl {
    struct mutex lock;
    struct hiudk_sdk sdk[UDK_MAX_SDK];
    struct hinic3_uld_info uld_info[SERVICE_T_MAX];
    struct mutex sdk_state_lock;
    enum hiudk_sdk_state sdk_state;
};

#endif
